package tetris;
import java.awt.*;

public class Nextwin extends Canvas{
    boolean[][] win = new boolean[4][4];
    float[][][] c = new float[4][4][4];
    public Nextwin(){
            setBackground(Color.black);
            for (int s=0;s<=3;s++)
                for (int t=0;t<=3;t++){
                    win[s][t]=true;
                    c[s][t][0]=0f;c[s][t][1]=0.9f;
                    c[s][t][2]=0f;c[s][t][3]=1f;
                }
    }
    public void paint(Graphics g){
        for (int i=0;i<=80;i=i+20){
                g.setColor(Color.darkGray);
                g.drawLine(i, 0, i, 80);
            }
            for (int j=0;j<=80;j=j+20){
                g.setColor(Color.darkGray);
                g.drawLine(0, j, 80, j);
            }
            for (int s=0;s<=3;s++)
                for (int t=0;t<=3;t++){
                    if (win[s][t]==false){
                        g.setColor(new Color(c[s][t][0],c[s][t][1],c[s][t][2],c[s][t][3]));
                        g.fill3DRect(s*20,t*20,20,20,true);
                    }
                }
    }
}
